<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <form action="{:U('Common/addCommon')}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">分类</label>
            <div class="controls">
                <select name="class_id" id="class_id">
                    <volist name="classes" id="v">
                        <option value="{$v.id}" <if condition="$data['class_id'] eq $v['id']">selected="selected"</if>>{$v.name}</option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">收货人</label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$data.name|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">联系电话</label>
            <div class="controls">
                <input type="text" class="text input-large" name="phone" value="{$data.phone|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">邮编</label>
            <div class="controls">
                <input type="text" class="text input-large" name="code" value="{$data.code|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">收货地址</label>
            <div class="controls">
                <input type="text" class="text input-large" name="address" value="{$data.address|default=''}">
            </div>
        </div>
        <div class="form-item">
            <input type="hidden" name="type" value="1">
            <input type="hidden" name="table" value="clients_address">
            <input type="hidden" name="methods" value="Vender">
            <input type="hidden" name="fields" value="name,text;class_id,text;phone,text;code,text;address,text;type,text">
            <input type="hidden" name="id" value="{$data.id|default=0}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>
